package cn.zhl.leetcode.链表;

/**
 * @program: demos
 * @description:
 * @author: 刘振华
 * @create: 2020-04-02 16:12
 **/
public class ListNode {
	int val;
	ListNode next;
	int flag;

	ListNode(int x) {
		val = x;
	}

	public static ListNode head(int[] ints) {
		ListNode head = new ListNode(ints[0]);
		head.flag = 0;
		ListNode node = head;
		for (int i = 1; i < ints.length; i++) {
			node.next = new ListNode(ints[i]);
			node.next.flag = i;
			node = node.next;
		}
		return head;
	}
}
